package o;

import android.animation.Animator;
import android.animation.AnimatorInflater;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources.NotFoundException;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.os.Looper;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.LayoutInflater.Factory2;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.ScaleAnimation;
import android.view.animation.Transformation;
import androidx.activity.OnBackPressedDispatcher;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.BackStackState;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.Fragment.SavedState;
import androidx.fragment.app.FragmentManagerState;
import androidx.fragment.app.FragmentState;
import com.huawei.appgallery.festivalanimation.particle.modifiers.SizeModifier;
import com.huawei.hms.framework.network.restclient.hwhttp.dns.DnsConfig;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public final class kd extends FragmentManager implements Factory2 {
    static final Interpolator ˉ = new DecelerateInterpolator(2.5f);
    static final Interpolator ˋˋ = new DecelerateInterpolator(1.5f);
    public static boolean ˎ = false;
    ArrayList<jt> ʻ;
    @Nullable
    Fragment ʻॱ;
    final ArrayList<Fragment> ʼ = new ArrayList();
    ArrayList<jt> ʼॱ;
    ArrayList<jt> ʽ;
    ArrayList<Boolean> ʽॱ;
    boolean ʾ;
    ArrayList<Fragment> ʿ;
    boolean ˈ;
    int ˊ = 0;
    Runnable ˊˊ = new Runnable(this) {
        final /* synthetic */ kd ˏ;

        {
            this.ˏ = r1;
        }

        public void run() {
            this.ˏ.ॱˊ();
        }
    };
    Bundle ˊˋ = null;
    jx ˊॱ;
    SparseArray<Parcelable> ˊᐝ = null;
    ArrayList<d> ˋ;
    ArrayList<j> ˋˊ;
    public jv ˋॱ;
    private final CopyOnWriteArrayList<c> ˋᐝ = new CopyOnWriteArrayList();
    private final z ˌ = new z(this, false) {
        final /* synthetic */ kd ˊ;

        public void ˏ() {
            this.ˊ.ʼ();
        }
    };
    private jz ˍ;
    private OnBackPressedDispatcher ˎˎ;
    ArrayList<o.ju.c> ˏॱ;
    int ͺ = 0;
    boolean ॱ;
    ArrayList<Integer> ॱˊ;
    boolean ॱˋ;
    Fragment ॱˎ;
    public final HashMap<String, Fragment> ॱॱ = new HashMap();
    boolean ॱᐝ;
    ArrayList<Fragment> ᐝ;
    boolean ᐝॱ;

    interface d {
        boolean ॱ(ArrayList<jt> arrayList, ArrayList<Boolean> arrayList2);
    }

    static class a {
        public static final int[] ˋ = new int[]{16842755, 16842960, 16842961};
    }

    static class b extends AnimationSet implements Runnable {
        private boolean ˊ = true;
        private boolean ˋ;
        private final ViewGroup ˎ;
        private final View ˏ;
        private boolean ॱ;

        b(@NonNull Animation animation, @NonNull ViewGroup viewGroup, @NonNull View view) {
            super(false);
            this.ˎ = viewGroup;
            this.ˏ = view;
            addAnimation(animation);
            this.ˎ.post(this);
        }

        public boolean getTransformation(long j, Transformation transformation) {
            this.ˊ = true;
            if (this.ॱ) {
                if (this.ˋ) {
                    return false;
                }
                return true;
            } else if (super.getTransformation(j, transformation)) {
                return true;
            } else {
                this.ॱ = true;
                hw.ˎ(this.ˎ, this);
                return true;
            }
        }

        public boolean getTransformation(long j, Transformation transformation, float f) {
            this.ˊ = true;
            if (this.ॱ) {
                if (this.ˋ) {
                    return false;
                }
                return true;
            } else if (super.getTransformation(j, transformation, f)) {
                return true;
            } else {
                this.ॱ = true;
                hw.ˎ(this.ˎ, this);
                return true;
            }
        }

        public void run() {
            if (this.ॱ || !this.ˊ) {
                this.ˎ.endViewTransition(this.ˏ);
                this.ˋ = true;
                return;
            }
            this.ˊ = false;
            this.ˎ.post(this);
        }
    }

    static final class c {
        final boolean ˎ;
        final o.ju.e ॱ;
    }

    static class e {
        public final Animator ˊ;
        public final Animation ˎ;

        e(Animation animation) {
            this.ˎ = animation;
            this.ˊ = null;
            if (animation == null) {
                throw new IllegalStateException("Animation cannot be null");
            }
        }

        e(Animator animator) {
            this.ˎ = null;
            this.ˊ = animator;
            if (animator == null) {
                throw new IllegalStateException("Animator cannot be null");
            }
        }
    }

    static class j implements androidx.fragment.app.Fragment.a {
        final boolean ˊ;
        private int ˎ;
        final jt ॱ;

        j(jt jtVar, boolean z) {
            this.ˊ = z;
            this.ॱ = jtVar;
        }

        public void ॱ() {
            this.ˎ--;
            if (this.ˎ == 0) {
                this.ॱ.ˏ.ˋॱ();
            }
        }

        public void ˏ() {
            this.ˎ++;
        }

        public boolean ˋ() {
            return this.ˎ == 0;
        }

        public void ˎ() {
            boolean z;
            boolean z2 = false;
            if (this.ˎ > 0) {
                z = true;
            } else {
                z = false;
            }
            kd kdVar = this.ॱ.ˏ;
            int size = kdVar.ʼ.size();
            for (int i = 0; i < size; i++) {
                Fragment fragment = (Fragment) kdVar.ʼ.get(i);
                fragment.ˋ(null);
                if (z && fragment.ʻˋ()) {
                    fragment.ـ();
                }
            }
            kd kdVar2 = this.ॱ.ˏ;
            jt jtVar = this.ॱ;
            boolean z3 = this.ˊ;
            if (!z) {
                z2 = true;
            }
            kdVar2.ॱ(jtVar, z3, z2, true);
        }

        public void ˊ() {
            this.ॱ.ˏ.ॱ(this.ॱ, this.ˊ, false, false);
        }
    }

    public boolean ॱˊ() {
        /* JADX: method processing error */
/*
Error: java.lang.NullPointerException
	at jadx.core.dex.visitors.ssa.SSATransform.placePhi(SSATransform.java:82)
	at jadx.core.dex.visitors.ssa.SSATransform.process(SSATransform.java:50)
	at jadx.core.dex.visitors.ssa.SSATransform.visit(SSATransform.java:42)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
	at jadx.core.ProcessClass.process(ProcessClass.java:37)
	at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59)
	at jadx.core.ProcessClass.process(ProcessClass.java:42)
	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306)
	at jadx.api.JavaClass.decompile(JavaClass.java:62)
*/
        /*
        r4 = this;
        r1 = 1;
        r4.ˋ(r1);
        r0 = 0;
    L_0x0005:
        r2 = r4.ʼॱ;
        r3 = r4.ʽॱ;
        r2 = r4.ˊ(r2, r3);
        if (r2 == 0) goto L_0x0022;
    L_0x000f:
        r4.ॱ = r1;
        r0 = r4.ʼॱ;	 Catch:{ all -> 0x001d }
        r2 = r4.ʽॱ;	 Catch:{ all -> 0x001d }
        r4.ˏ(r0, r2);	 Catch:{ all -> 0x001d }
        r4.ˋᐝ();
        r0 = r1;
        goto L_0x0005;
    L_0x001d:
        r0 = move-exception;
        r4.ˋᐝ();
        throw r0;
    L_0x0022:
        r4.ˉ();
        r4.ˏॱ();
        r4.ˍ();
        return r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.kd.ॱˊ():boolean");
    }

    private void ˊ(RuntimeException runtimeException) {
        Log.e("FragmentManager", runtimeException.getMessage());
        Log.e("FragmentManager", "Activity state:");
        PrintWriter printWriter = new PrintWriter(new gy("FragmentManager"));
        if (this.ˋॱ != null) {
            try {
                this.ˋॱ.ˋ("  ", null, printWriter, new String[0]);
            } catch (Throwable e) {
                Log.e("FragmentManager", "Failed dumping state", e);
            }
        } else {
            try {
                ˎ("  ", null, printWriter, new String[0]);
            } catch (Throwable e2) {
                Log.e("FragmentManager", "Failed dumping state", e2);
            }
        }
        throw runtimeException;
    }

    @NonNull
    public FragmentTransaction ˊ() {
        return new jt(this);
    }

    public boolean ॱ() {
        boolean ॱˊ = ॱˊ();
        ˌ();
        return ॱˊ;
    }

    private void ˉ() {
        boolean z = true;
        if (this.ˋ == null || this.ˋ.isEmpty()) {
            z zVar = this.ˌ;
            if (ʽ() <= 0 || !ˏ(this.ॱˎ)) {
                z = false;
            }
            zVar.ˎ(z);
            return;
        }
        this.ˌ.ˎ(true);
    }

    public boolean ˏ(@Nullable Fragment fragment) {
        if (fragment == null) {
            return true;
        }
        kd kdVar = fragment.ˊᐝ;
        if (fragment == kdVar.ˊᐝ() && ˏ(kdVar.ॱˎ)) {
            return true;
        }
        return false;
    }

    void ʼ() {
        ॱˊ();
        if (this.ˌ.ˋ()) {
            ˎ();
        } else {
            this.ˎˎ.ˏ();
        }
    }

    public boolean ˎ() {
        ˋˋ();
        return ˊ(null, -1, 0);
    }

    public void ˋ(int i, int i2) {
        if (i < 0) {
            throw new IllegalArgumentException("Bad id: " + i);
        }
        ˏ(new g(this, null, i, i2), false);
    }

    private boolean ˊ(String str, int i, int i2) {
        ॱˊ();
        ˋ(true);
        if (this.ʻॱ != null && i < 0 && str == null && this.ʻॱ.ʽॱ().ˎ()) {
            return true;
        }
        boolean ˎ = ˎ(this.ʼॱ, this.ʽॱ, str, i, i2);
        if (ˎ) {
            this.ॱ = true;
            try {
                ˏ(this.ʼॱ, this.ʽॱ);
            } finally {
                ˋᐝ();
            }
        }
        ˉ();
        ˏॱ();
        ˍ();
        return ˎ;
    }

    public int ʽ() {
        return this.ʻ != null ? this.ʻ.size() : 0;
    }

    public void ˋ(Bundle bundle, String str, Fragment fragment) {
        if (fragment.ˊᐝ != this) {
            ˊ(new IllegalStateException("Fragment " + fragment + " is not currently in the FragmentManager"));
        }
        bundle.putString(str, fragment.ˊॱ);
    }

    @Nullable
    public Fragment ˊ(Bundle bundle, String str) {
        String string = bundle.getString(str);
        if (string == null) {
            return null;
        }
        Fragment fragment = (Fragment) this.ॱॱ.get(string);
        if (fragment != null) {
            return fragment;
        }
        ˊ(new IllegalStateException("Fragment no longer exists for key " + str + ": unique id " + string));
        return fragment;
    }

    public List<Fragment> ˏ() {
        if (this.ʼ.isEmpty()) {
            return Collections.emptyList();
        }
        List<Fragment> list;
        synchronized (this.ʼ) {
            list = (List) this.ʼ.clone();
        }
        return list;
    }

    @NonNull
    public lh ˋ(@NonNull Fragment fragment) {
        return this.ˍ.ˎ(fragment);
    }

    @NonNull
    jz ॱ(@NonNull Fragment fragment) {
        return this.ˍ.ˊ(fragment);
    }

    public void ˎ(@NonNull Fragment fragment) {
        if (ᐝ()) {
            if (ˎ) {
                Log.v("FragmentManager", "Ignoring addRetainedFragment as the state is already saved");
            }
        } else if (this.ˍ.ˏ(fragment) && ˎ) {
            Log.v("FragmentManager", "Updating retained Fragments: Added " + fragment);
        }
    }

    public void ॱॱ(@NonNull Fragment fragment) {
        if (ᐝ()) {
            if (ˎ) {
                Log.v("FragmentManager", "Ignoring removeRetainedFragment as the state is already saved");
            }
        } else if (this.ˍ.ˋ(fragment) && ˎ) {
            Log.v("FragmentManager", "Updating retained Fragments: Removed " + fragment);
        }
    }

    @Nullable
    public SavedState ˊ(@NonNull Fragment fragment) {
        if (fragment.ˊᐝ != this) {
            ˊ(new IllegalStateException("Fragment " + fragment + " is not currently in the FragmentManager"));
        }
        if (fragment.ͺ <= 0) {
            return null;
        }
        Bundle ॱˋ = ॱˋ(fragment);
        if (ॱˋ != null) {
            return new SavedState(ॱˋ);
        }
        return null;
    }

    public boolean ॱॱ() {
        return this.ʾ;
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder(DnsConfig.MAX_CACHE_ENTRIES);
        stringBuilder.append("FragmentManager{");
        stringBuilder.append(Integer.toHexString(System.identityHashCode(this)));
        stringBuilder.append(" in ");
        if (this.ॱˎ != null) {
            gx.ˎ(this.ॱˎ, stringBuilder);
        } else {
            gx.ˎ(this.ˋॱ, stringBuilder);
        }
        stringBuilder.append("}}");
        return stringBuilder.toString();
    }

    public void ˎ(@NonNull String str, @Nullable FileDescriptor fileDescriptor, @NonNull PrintWriter printWriter, @Nullable String[] strArr) {
        Fragment fragment;
        int i;
        int i2 = 0;
        String str2 = str + "    ";
        if (!this.ॱॱ.isEmpty()) {
            printWriter.print(str);
            printWriter.print("Active Fragments in ");
            printWriter.print(Integer.toHexString(System.identityHashCode(this)));
            printWriter.println(":");
            for (Fragment fragment2 : this.ॱॱ.values()) {
                printWriter.print(str);
                printWriter.println(fragment2);
                if (fragment2 != null) {
                    fragment2.ˎ(str2, fileDescriptor, printWriter, strArr);
                }
            }
        }
        int size = this.ʼ.size();
        if (size > 0) {
            printWriter.print(str);
            printWriter.println("Added Fragments:");
            for (i = 0; i < size; i++) {
                fragment2 = (Fragment) this.ʼ.get(i);
                printWriter.print(str);
                printWriter.print("  #");
                printWriter.print(i);
                printWriter.print(": ");
                printWriter.println(fragment2.toString());
            }
        }
        if (this.ᐝ != null) {
            size = this.ᐝ.size();
            if (size > 0) {
                printWriter.print(str);
                printWriter.println("Fragments Created Menus:");
                for (i = 0; i < size; i++) {
                    fragment2 = (Fragment) this.ᐝ.get(i);
                    printWriter.print(str);
                    printWriter.print("  #");
                    printWriter.print(i);
                    printWriter.print(": ");
                    printWriter.println(fragment2.toString());
                }
            }
        }
        if (this.ʻ != null) {
            size = this.ʻ.size();
            if (size > 0) {
                printWriter.print(str);
                printWriter.println("Back Stack:");
                for (i = 0; i < size; i++) {
                    jt jtVar = (jt) this.ʻ.get(i);
                    printWriter.print(str);
                    printWriter.print("  #");
                    printWriter.print(i);
                    printWriter.print(": ");
                    printWriter.println(jtVar.toString());
                    jtVar.ˊ(str2, printWriter);
                }
            }
        }
        synchronized (this) {
            if (this.ʽ != null) {
                int size2 = this.ʽ.size();
                if (size2 > 0) {
                    printWriter.print(str);
                    printWriter.println("Back Stack Indices:");
                    for (i = 0; i < size2; i++) {
                        jtVar = (jt) this.ʽ.get(i);
                        printWriter.print(str);
                        printWriter.print("  #");
                        printWriter.print(i);
                        printWriter.print(": ");
                        printWriter.println(jtVar);
                    }
                }
            }
            if (this.ॱˊ != null && this.ॱˊ.size() > 0) {
                printWriter.print(str);
                printWriter.print("mAvailBackStackIndices: ");
                printWriter.println(Arrays.toString(this.ॱˊ.toArray()));
            }
        }
        if (this.ˋ != null) {
            i = this.ˋ.size();
            if (i > 0) {
                printWriter.print(str);
                printWriter.println("Pending Actions:");
                while (i2 < i) {
                    d dVar = (d) this.ˋ.get(i2);
                    printWriter.print(str);
                    printWriter.print("  #");
                    printWriter.print(i2);
                    printWriter.print(": ");
                    printWriter.println(dVar);
                    i2++;
                }
            }
        }
        printWriter.print(str);
        printWriter.println("FragmentManager misc state:");
        printWriter.print(str);
        printWriter.print("  mHost=");
        printWriter.println(this.ˋॱ);
        printWriter.print(str);
        printWriter.print("  mContainer=");
        printWriter.println(this.ˊॱ);
        if (this.ॱˎ != null) {
            printWriter.print(str);
            printWriter.print("  mParent=");
            printWriter.println(this.ॱˎ);
        }
        printWriter.print(str);
        printWriter.print("  mCurState=");
        printWriter.print(this.ͺ);
        printWriter.print(" mStateSaved=");
        printWriter.print(this.ᐝॱ);
        printWriter.print(" mStopped=");
        printWriter.print(this.ॱˋ);
        printWriter.print(" mDestroyed=");
        printWriter.println(this.ʾ);
        if (this.ॱᐝ) {
            printWriter.print(str);
            printWriter.print("  mNeedMenuInvalidate=");
            printWriter.println(this.ॱᐝ);
        }
    }

    static e ॱ(float f, float f2, float f3, float f4) {
        Animation animationSet = new AnimationSet(false);
        Animation scaleAnimation = new ScaleAnimation(f, f2, f, f2, 1, 0.5f, 1, 0.5f);
        scaleAnimation.setInterpolator(ˉ);
        scaleAnimation.setDuration(220);
        animationSet.addAnimation(scaleAnimation);
        scaleAnimation = new AlphaAnimation(f3, f4);
        scaleAnimation.setInterpolator(ˋˋ);
        scaleAnimation.setDuration(220);
        animationSet.addAnimation(scaleAnimation);
        return new e(animationSet);
    }

    static e ॱ(float f, float f2) {
        Animation alphaAnimation = new AlphaAnimation(f, f2);
        alphaAnimation.setInterpolator(ˋˋ);
        alphaAnimation.setDuration(220);
        return new e(alphaAnimation);
    }

    e ˎ(Fragment fragment, int i, boolean z, int i2) {
        int ʹ = fragment.ʹ();
        fragment.ˎ(0);
        if (fragment.ˏˏ != null && fragment.ˏˏ.getLayoutTransition() != null) {
            return null;
        }
        Animation ˏ = fragment.ˏ(i, z, ʹ);
        if (ˏ != null) {
            return new e(ˏ);
        }
        Animator ˎ = fragment.ˎ(i, z, ʹ);
        if (ˎ != null) {
            return new e(ˎ);
        }
        int i3;
        if (ʹ != 0) {
            boolean equals = "anim".equals(this.ˋॱ.ˋॱ().getResources().getResourceTypeName(ʹ));
            if (equals) {
                try {
                    Animation loadAnimation = AnimationUtils.loadAnimation(this.ˋॱ.ˋॱ(), ʹ);
                    if (loadAnimation != null) {
                        return new e(loadAnimation);
                    }
                    i3 = 1;
                } catch (NotFoundException e) {
                    throw e;
                } catch (RuntimeException e2) {
                    i3 = 0;
                }
            } else {
                i3 = 0;
            }
            if (i3 == 0) {
                try {
                    Animator loadAnimator = AnimatorInflater.loadAnimator(this.ˋॱ.ˋॱ(), ʹ);
                    if (loadAnimator != null) {
                        return new e(loadAnimator);
                    }
                } catch (RuntimeException e3) {
                    if (equals) {
                        throw e3;
                    }
                    ˏ = AnimationUtils.loadAnimation(this.ˋॱ.ˋॱ(), ʹ);
                    if (ˏ != null) {
                        return new e(ˏ);
                    }
                }
            }
        }
        if (i == 0) {
            return null;
        }
        i3 = ˎ(i, z);
        if (i3 < 0) {
            return null;
        }
        switch (i3) {
            case 1:
                return ॱ(1.125f, 1.0f, 0.0f, 1.0f);
            case 2:
                return ॱ(1.0f, 0.975f, 1.0f, 0.0f);
            case 3:
                return ॱ(0.975f, 1.0f, 0.0f, 1.0f);
            case 4:
                return ॱ(1.0f, 1.075f, 1.0f, 0.0f);
            case 5:
                return ॱ(0.0f, 1.0f);
            case 6:
                return ॱ(1.0f, 0.0f);
            default:
                if (i2 == 0 && this.ˋॱ.ᐝ()) {
                    i2 = this.ˋॱ.ʼ();
                }
                return i2 == 0 ? null : null;
        }
    }

    public void ᐝ(Fragment fragment) {
        if (!fragment.ॱʻ) {
            return;
        }
        if (this.ॱ) {
            this.ˈ = true;
            return;
        }
        fragment.ॱʻ = false;
        ˏ(fragment, this.ͺ, 0, 0, false);
    }

    public boolean ˎ(int i) {
        return this.ͺ >= i;
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    void ˏ(androidx.fragment.app.Fragment r8, int r9, int r10, int r11, boolean r12) {
        /*
        r7 = this;
        r0 = r8.ᐝॱ;
        if (r0 == 0) goto L_0x0008;
    L_0x0004:
        r0 = r8.ˋᐝ;
        if (r0 == 0) goto L_0x000c;
    L_0x0008:
        r0 = 1;
        if (r9 <= r0) goto L_0x000c;
    L_0x000b:
        r9 = 1;
    L_0x000c:
        r0 = r8.ʼॱ;
        if (r0 == 0) goto L_0x001f;
    L_0x0010:
        r0 = r8.ͺ;
        if (r9 <= r0) goto L_0x001f;
    L_0x0014:
        r0 = r8.ͺ;
        if (r0 != 0) goto L_0x0045;
    L_0x0018:
        r0 = r8.ॱॱ();
        if (r0 == 0) goto L_0x0045;
    L_0x001e:
        r9 = 1;
    L_0x001f:
        r0 = r8.ॱʻ;
        if (r0 == 0) goto L_0x002c;
    L_0x0023:
        r0 = r8.ͺ;
        r1 = 3;
        if (r0 >= r1) goto L_0x002c;
    L_0x0028:
        r0 = 2;
        if (r9 <= r0) goto L_0x002c;
    L_0x002b:
        r9 = 2;
    L_0x002c:
        r0 = r8.ꜞ;
        r1 = o.kp.c.CREATED;
        if (r0 != r1) goto L_0x0048;
    L_0x0032:
        r0 = 1;
        r0 = java.lang.Math.min(r9, r0);
        r6 = r0;
    L_0x0038:
        r0 = r8.ͺ;
        if (r0 > r6) goto L_0x038f;
    L_0x003c:
        r0 = r8.ʿ;
        if (r0 == 0) goto L_0x0054;
    L_0x0040:
        r0 = r8.ʽॱ;
        if (r0 != 0) goto L_0x0054;
    L_0x0044:
        return;
    L_0x0045:
        r9 = r8.ͺ;
        goto L_0x001f;
    L_0x0048:
        r0 = r8.ꜞ;
        r0 = r0.ordinal();
        r0 = java.lang.Math.min(r9, r0);
        r6 = r0;
        goto L_0x0038;
    L_0x0054:
        r0 = r8.ʻᐝ();
        if (r0 != 0) goto L_0x0060;
    L_0x005a:
        r0 = r8.ʼˊ();
        if (r0 == 0) goto L_0x0074;
    L_0x0060:
        r0 = 0;
        r8.ˏ(r0);
        r0 = 0;
        r8.ˏ(r0);
        r2 = r8.ʻˊ();
        r3 = 0;
        r4 = 0;
        r5 = 1;
        r0 = r7;
        r1 = r8;
        r0.ˏ(r1, r2, r3, r4, r5);
    L_0x0074:
        r0 = r8.ͺ;
        switch(r0) {
            case 0: goto L_0x00ae;
            case 1: goto L_0x0219;
            case 2: goto L_0x031d;
            case 3: goto L_0x0343;
            default: goto L_0x0079;
        };
    L_0x0079:
        r0 = r8.ͺ;
        if (r0 == r6) goto L_0x0044;
    L_0x007d:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "moveToState: Fragment state for ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r2 = " not updated inline; expected state ";
        r1 = r1.append(r2);
        r1 = r1.append(r6);
        r2 = " found ";
        r1 = r1.append(r2);
        r2 = r8.ͺ;
        r1 = r1.append(r2);
        r1 = r1.toString();
        android.util.Log.w(r0, r1);
        r8.ͺ = r6;
        goto L_0x0044;
    L_0x00ae:
        if (r6 <= 0) goto L_0x0219;
    L_0x00b0:
        r0 = ˎ;
        if (r0 == 0) goto L_0x00cc;
    L_0x00b4:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "moveto CREATED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x00cc:
        r0 = r8.ॱˊ;
        if (r0 == 0) goto L_0x0120;
    L_0x00d0:
        r0 = r8.ॱˊ;
        r1 = r7.ˋॱ;
        r1 = r1.ˋॱ();
        r1 = r1.getClassLoader();
        r0.setClassLoader(r1);
        r0 = r8.ॱˊ;
        r1 = "android:view_state";
        r0 = r0.getSparseParcelableArray(r1);
        r8.ˏॱ = r0;
        r0 = r8.ॱˊ;
        r1 = "android:target_state";
        r0 = r7.ˊ(r0, r1);
        if (r0 == 0) goto L_0x016f;
    L_0x00f3:
        r0 = r0.ˊॱ;
    L_0x00f5:
        r8.ʻॱ = r0;
        r0 = r8.ʻॱ;
        if (r0 == 0) goto L_0x0106;
    L_0x00fb:
        r0 = r8.ॱˊ;
        r1 = "android:target_req_state";
        r2 = 0;
        r0 = r0.getInt(r1, r2);
        r8.ॱˋ = r0;
    L_0x0106:
        r0 = r8.ˋॱ;
        if (r0 == 0) goto L_0x0171;
    L_0x010a:
        r0 = r8.ˋॱ;
        r0 = r0.booleanValue();
        r8.ॱͺ = r0;
        r0 = 0;
        r8.ˋॱ = r0;
    L_0x0115:
        r0 = r8.ॱͺ;
        if (r0 != 0) goto L_0x0120;
    L_0x0119:
        r0 = 1;
        r8.ॱʻ = r0;
        r0 = 2;
        if (r6 <= r0) goto L_0x0120;
    L_0x011f:
        r6 = 2;
    L_0x0120:
        r0 = r7.ˋॱ;
        r8.ˊˊ = r0;
        r0 = r7.ॱˎ;
        r8.ˉ = r0;
        r0 = r7.ॱˎ;
        if (r0 == 0) goto L_0x017d;
    L_0x012c:
        r0 = r7.ॱˎ;
        r0 = r0.ˊˋ;
    L_0x0130:
        r8.ˊᐝ = r0;
        r0 = r8.ॱᐝ;
        if (r0 == 0) goto L_0x019c;
    L_0x0136:
        r0 = r7.ॱॱ;
        r1 = r8.ॱᐝ;
        r1 = r1.ˊॱ;
        r0 = r0.get(r1);
        r1 = r8.ॱᐝ;
        if (r0 == r1) goto L_0x0182;
    L_0x0144:
        r0 = new java.lang.IllegalStateException;
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "Fragment ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r2 = " declared target fragment ";
        r1 = r1.append(r2);
        r2 = r8.ॱᐝ;
        r1 = r1.append(r2);
        r2 = " that does not belong to this FragmentManager!";
        r1 = r1.append(r2);
        r1 = r1.toString();
        r0.<init>(r1);
        throw r0;
    L_0x016f:
        r0 = 0;
        goto L_0x00f5;
    L_0x0171:
        r0 = r8.ॱˊ;
        r1 = "android:user_visible_hint";
        r2 = 1;
        r0 = r0.getBoolean(r1, r2);
        r8.ॱͺ = r0;
        goto L_0x0115;
    L_0x017d:
        r0 = r7.ˋॱ;
        r0 = r0.ˊ;
        goto L_0x0130;
    L_0x0182:
        r0 = r8.ॱᐝ;
        r0 = r0.ͺ;
        r1 = 1;
        if (r0 >= r1) goto L_0x0193;
    L_0x0189:
        r1 = r8.ॱᐝ;
        r2 = 1;
        r3 = 0;
        r4 = 0;
        r5 = 1;
        r0 = r7;
        r0.ˏ(r1, r2, r3, r4, r5);
    L_0x0193:
        r0 = r8.ॱᐝ;
        r0 = r0.ˊॱ;
        r8.ʻॱ = r0;
        r0 = 0;
        r8.ॱᐝ = r0;
    L_0x019c:
        r0 = r8.ʻॱ;
        if (r0 == 0) goto L_0x01e4;
    L_0x01a0:
        r0 = r7.ॱॱ;
        r1 = r8.ʻॱ;
        r1 = r0.get(r1);
        r1 = (androidx.fragment.app.Fragment) r1;
        if (r1 != 0) goto L_0x01d7;
    L_0x01ac:
        r0 = new java.lang.IllegalStateException;
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "Fragment ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r2 = " declared target fragment ";
        r1 = r1.append(r2);
        r2 = r8.ʻॱ;
        r1 = r1.append(r2);
        r2 = " that does not belong to this FragmentManager!";
        r1 = r1.append(r2);
        r1 = r1.toString();
        r0.<init>(r1);
        throw r0;
    L_0x01d7:
        r0 = r1.ͺ;
        r2 = 1;
        if (r0 >= r2) goto L_0x01e4;
    L_0x01dc:
        r2 = 1;
        r3 = 0;
        r4 = 0;
        r5 = 1;
        r0 = r7;
        r0.ˏ(r1, r2, r3, r4, r5);
    L_0x01e4:
        r0 = r7.ˋॱ;
        r0 = r0.ˋॱ();
        r1 = 0;
        r7.ॱ(r8, r0, r1);
        r8.ᐝˋ();
        r0 = r8.ˉ;
        if (r0 != 0) goto L_0x0371;
    L_0x01f5:
        r0 = r7.ˋॱ;
        r0.ॱ(r8);
    L_0x01fa:
        r0 = r7.ˋॱ;
        r0 = r0.ˋॱ();
        r1 = 0;
        r7.ˎ(r8, r0, r1);
        r0 = r8.ㆍ;
        if (r0 != 0) goto L_0x0378;
    L_0x0208:
        r0 = r8.ॱˊ;
        r1 = 0;
        r7.ˊ(r8, r0, r1);
        r0 = r8.ॱˊ;
        r8.ͺ(r0);
        r0 = r8.ॱˊ;
        r1 = 0;
        r7.ˋ(r8, r0, r1);
    L_0x0219:
        if (r6 <= 0) goto L_0x021e;
    L_0x021b:
        r7.ʼ(r8);
    L_0x021e:
        r0 = 1;
        if (r6 <= r0) goto L_0x031d;
    L_0x0221:
        r0 = ˎ;
        if (r0 == 0) goto L_0x023d;
    L_0x0225:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "moveto ACTIVITY_CREATED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x023d:
        r0 = r8.ʿ;
        if (r0 != 0) goto L_0x0306;
    L_0x0241:
        r0 = 0;
        r1 = r8.ˍ;
        if (r1 == 0) goto L_0x02bb;
    L_0x0246:
        r0 = r8.ˍ;
        r1 = -1;
        if (r0 != r1) goto L_0x026c;
    L_0x024b:
        r0 = new java.lang.IllegalArgumentException;
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "Cannot create fragment ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r2 = " for a container view with no id";
        r1 = r1.append(r2);
        r1 = r1.toString();
        r0.<init>(r1);
        r7.ˊ(r0);
    L_0x026c:
        r0 = r7.ˊॱ;
        r1 = r8.ˍ;
        r0 = r0.ˊ(r1);
        r0 = (android.view.ViewGroup) r0;
        if (r0 != 0) goto L_0x02bb;
    L_0x0278:
        r1 = r8.ˈ;
        if (r1 != 0) goto L_0x02bb;
    L_0x027c:
        r1 = r8.ᐝॱ();	 Catch:{ NotFoundException -> 0x0382 }
        r2 = r8.ˍ;	 Catch:{ NotFoundException -> 0x0382 }
        r1 = r1.getResourceName(r2);	 Catch:{ NotFoundException -> 0x0382 }
    L_0x0286:
        r2 = new java.lang.IllegalArgumentException;
        r3 = new java.lang.StringBuilder;
        r3.<init>();
        r4 = "No view found for id 0x";
        r3 = r3.append(r4);
        r4 = r8.ˍ;
        r4 = java.lang.Integer.toHexString(r4);
        r3 = r3.append(r4);
        r4 = " (";
        r3 = r3.append(r4);
        r1 = r3.append(r1);
        r3 = ") for fragment ";
        r1 = r1.append(r3);
        r1 = r1.append(r8);
        r1 = r1.toString();
        r2.<init>(r1);
        r7.ˊ(r2);
    L_0x02bb:
        r8.ˏˏ = r0;
        r1 = r8.ॱˊ;
        r1 = r8.ʽ(r1);
        r2 = r8.ॱˊ;
        r8.ˎ(r1, r0, r2);
        r1 = r8.ॱʼ;
        if (r1 == 0) goto L_0x038a;
    L_0x02cc:
        r1 = r8.ॱʼ;
        r8.ـ = r1;
        r1 = r8.ॱʼ;
        r2 = 0;
        r1.setSaveFromParentEnabled(r2);
        if (r0 == 0) goto L_0x02dd;
    L_0x02d8:
        r1 = r8.ॱʼ;
        r0.addView(r1);
    L_0x02dd:
        r0 = r8.ˋˋ;
        if (r0 == 0) goto L_0x02e8;
    L_0x02e1:
        r0 = r8.ॱʼ;
        r1 = 8;
        r0.setVisibility(r1);
    L_0x02e8:
        r0 = r8.ॱʼ;
        r1 = r8.ॱˊ;
        r8.ˊ(r0, r1);
        r0 = r8.ॱʼ;
        r1 = r8.ॱˊ;
        r2 = 0;
        r7.ˎ(r8, r0, r1, r2);
        r0 = r8.ॱʼ;
        r0 = r0.getVisibility();
        if (r0 != 0) goto L_0x0387;
    L_0x02ff:
        r0 = r8.ˏˏ;
        if (r0 == 0) goto L_0x0387;
    L_0x0303:
        r0 = 1;
    L_0x0304:
        r8.ᐧ = r0;
    L_0x0306:
        r0 = r8.ॱˊ;
        r8.ˏॱ(r0);
        r0 = r8.ॱˊ;
        r1 = 0;
        r7.ˏ(r8, r0, r1);
        r0 = r8.ॱʼ;
        if (r0 == 0) goto L_0x031a;
    L_0x0315:
        r0 = r8.ॱˊ;
        r8.ʻ(r0);
    L_0x031a:
        r0 = 0;
        r8.ॱˊ = r0;
    L_0x031d:
        r0 = 2;
        if (r6 <= r0) goto L_0x0343;
    L_0x0320:
        r0 = ˎ;
        if (r0 == 0) goto L_0x033c;
    L_0x0324:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "moveto STARTED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x033c:
        r8.ᐨ();
        r0 = 0;
        r7.ˏ(r8, r0);
    L_0x0343:
        r0 = 3;
        if (r6 <= r0) goto L_0x0079;
    L_0x0346:
        r0 = ˎ;
        if (r0 == 0) goto L_0x0362;
    L_0x034a:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "moveto RESUMED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x0362:
        r8.ᐝˊ();
        r0 = 0;
        r7.ˎ(r8, r0);
        r0 = 0;
        r8.ॱˊ = r0;
        r0 = 0;
        r8.ˏॱ = r0;
        goto L_0x0079;
    L_0x0371:
        r0 = r8.ˉ;
        r0.ˋ(r8);
        goto L_0x01fa;
    L_0x0378:
        r0 = r8.ॱˊ;
        r8.ᐝ(r0);
        r0 = 1;
        r8.ͺ = r0;
        goto L_0x0219;
    L_0x0382:
        r1 = move-exception;
        r1 = "unknown";
        goto L_0x0286;
    L_0x0387:
        r0 = 0;
        goto L_0x0304;
    L_0x038a:
        r0 = 0;
        r8.ـ = r0;
        goto L_0x0306;
    L_0x038f:
        r0 = r8.ͺ;
        if (r0 <= r6) goto L_0x0079;
    L_0x0393:
        r0 = r8.ͺ;
        switch(r0) {
            case 1: goto L_0x039a;
            case 2: goto L_0x0410;
            case 3: goto L_0x03ea;
            case 4: goto L_0x03c4;
            default: goto L_0x0398;
        };
    L_0x0398:
        goto L_0x0079;
    L_0x039a:
        r0 = 1;
        if (r6 >= r0) goto L_0x0079;
    L_0x039d:
        r0 = r7.ʾ;
        if (r0 == 0) goto L_0x03b2;
    L_0x03a1:
        r0 = r8.ʻᐝ();
        if (r0 == 0) goto L_0x04ae;
    L_0x03a7:
        r0 = r8.ʻᐝ();
        r1 = 0;
        r8.ˏ(r1);
        r0.clearAnimation();
    L_0x03b2:
        r0 = r8.ʻᐝ();
        if (r0 != 0) goto L_0x03be;
    L_0x03b8:
        r0 = r8.ʼˊ();
        if (r0 == 0) goto L_0x04c1;
    L_0x03be:
        r8.ˏ(r6);
        r6 = 1;
        goto L_0x0079;
    L_0x03c4:
        r0 = 4;
        if (r6 >= r0) goto L_0x03ea;
    L_0x03c7:
        r0 = ˎ;
        if (r0 == 0) goto L_0x03e3;
    L_0x03cb:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "movefrom RESUMED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x03e3:
        r8.ꓸ();
        r0 = 0;
        r7.ˋ(r8, r0);
    L_0x03ea:
        r0 = 3;
        if (r6 >= r0) goto L_0x0410;
    L_0x03ed:
        r0 = ˎ;
        if (r0 == 0) goto L_0x0409;
    L_0x03f1:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "movefrom STARTED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x0409:
        r8.ꜟ();
        r0 = 0;
        r7.ˊ(r8, r0);
    L_0x0410:
        r0 = 2;
        if (r6 >= r0) goto L_0x039a;
    L_0x0413:
        r0 = ˎ;
        if (r0 == 0) goto L_0x042f;
    L_0x0417:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "movefrom ACTIVITY_CREATED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x042f:
        r0 = r8.ॱʼ;
        if (r0 == 0) goto L_0x0442;
    L_0x0433:
        r0 = r7.ˋॱ;
        r0 = r0.ˋ(r8);
        if (r0 == 0) goto L_0x0442;
    L_0x043b:
        r0 = r8.ˏॱ;
        if (r0 != 0) goto L_0x0442;
    L_0x043f:
        r7.ॱᐝ(r8);
    L_0x0442:
        r8.ᶥ();
        r0 = 0;
        r7.ॱॱ(r8, r0);
        r0 = r8.ॱʼ;
        if (r0 == 0) goto L_0x0497;
    L_0x044d:
        r0 = r8.ˏˏ;
        if (r0 == 0) goto L_0x0497;
    L_0x0451:
        r0 = r8.ˏˏ;
        r1 = r8.ॱʼ;
        r0.endViewTransition(r1);
        r0 = r8.ॱʼ;
        r0.clearAnimation();
        r0 = 0;
        r1 = r8.ˈ();
        if (r1 == 0) goto L_0x046c;
    L_0x0464:
        r1 = r8.ˈ();
        r1 = r1.ʼॱ;
        if (r1 != 0) goto L_0x0497;
    L_0x046c:
        r1 = r7.ͺ;
        if (r1 <= 0) goto L_0x0488;
    L_0x0470:
        r1 = r7.ʾ;
        if (r1 != 0) goto L_0x0488;
    L_0x0474:
        r1 = r8.ॱʼ;
        r1 = r1.getVisibility();
        if (r1 != 0) goto L_0x0488;
    L_0x047c:
        r1 = r8.ᐝᐝ;
        r2 = 0;
        r1 = (r1 > r2 ? 1 : (r1 == r2 ? 0 : -1));
        if (r1 < 0) goto L_0x0488;
    L_0x0483:
        r0 = 0;
        r0 = r7.ˎ(r8, r10, r0, r11);
    L_0x0488:
        r1 = 0;
        r8.ᐝᐝ = r1;
        if (r0 == 0) goto L_0x0490;
    L_0x048d:
        r7.ˊ(r8, r0, r6);
    L_0x0490:
        r0 = r8.ˏˏ;
        r1 = r8.ॱʼ;
        r0.removeView(r1);
    L_0x0497:
        r0 = 0;
        r8.ˏˏ = r0;
        r0 = 0;
        r8.ॱʼ = r0;
        r0 = 0;
        r8.ᶥ = r0;
        r0 = r8.ꜟ;
        r1 = 0;
        r0.ॱ(r1);
        r0 = 0;
        r8.ـ = r0;
        r0 = 0;
        r8.ʽॱ = r0;
        goto L_0x039a;
    L_0x04ae:
        r0 = r8.ʼˊ();
        if (r0 == 0) goto L_0x03b2;
    L_0x04b4:
        r0 = r8.ʼˊ();
        r1 = 0;
        r8.ˏ(r1);
        r0.cancel();
        goto L_0x03b2;
    L_0x04c1:
        r0 = ˎ;
        if (r0 == 0) goto L_0x04dd;
    L_0x04c5:
        r0 = "FragmentManager";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "movefrom CREATED: ";
        r1 = r1.append(r2);
        r1 = r1.append(r8);
        r1 = r1.toString();
        android.util.Log.v(r0, r1);
    L_0x04dd:
        r0 = r8.ʼॱ;
        if (r0 == 0) goto L_0x0527;
    L_0x04e1:
        r0 = r8.ॱॱ();
        if (r0 != 0) goto L_0x0527;
    L_0x04e7:
        r0 = 1;
        r1 = r0;
    L_0x04e9:
        if (r1 != 0) goto L_0x04f3;
    L_0x04eb:
        r0 = r7.ˍ;
        r0 = r0.ॱ(r8);
        if (r0 == 0) goto L_0x0548;
    L_0x04f3:
        r0 = r7.ˋॱ;
        r0 = r0 instanceof o.lg;
        if (r0 == 0) goto L_0x052a;
    L_0x04f9:
        r0 = r7.ˍ;
        r0 = r0.ˊ();
    L_0x04ff:
        if (r1 != 0) goto L_0x0503;
    L_0x0501:
        if (r0 == 0) goto L_0x0508;
    L_0x0503:
        r0 = r7.ˍ;
        r0.ॱॱ(r8);
    L_0x0508:
        r8.ꜞ();
        r0 = 0;
        r7.ʻ(r8, r0);
    L_0x050f:
        r8.ﹳ();
        r0 = 0;
        r7.ᐝ(r8, r0);
        if (r12 != 0) goto L_0x0079;
    L_0x0518:
        if (r1 != 0) goto L_0x0522;
    L_0x051a:
        r0 = r7.ˍ;
        r0 = r0.ॱ(r8);
        if (r0 == 0) goto L_0x054c;
    L_0x0522:
        r7.ˋॱ(r8);
        goto L_0x0079;
    L_0x0527:
        r0 = 0;
        r1 = r0;
        goto L_0x04e9;
    L_0x052a:
        r0 = r7.ˋॱ;
        r0 = r0.ˋॱ();
        r0 = r0 instanceof android.app.Activity;
        if (r0 == 0) goto L_0x0546;
    L_0x0534:
        r0 = r7.ˋॱ;
        r0 = r0.ˋॱ();
        r0 = (android.app.Activity) r0;
        r0 = r0.isChangingConfigurations();
        if (r0 != 0) goto L_0x0544;
    L_0x0542:
        r0 = 1;
        goto L_0x04ff;
    L_0x0544:
        r0 = 0;
        goto L_0x04ff;
    L_0x0546:
        r0 = 1;
        goto L_0x04ff;
    L_0x0548:
        r0 = 0;
        r8.ͺ = r0;
        goto L_0x050f;
    L_0x054c:
        r0 = 0;
        r8.ˊˊ = r0;
        r0 = 0;
        r8.ˉ = r0;
        r0 = 0;
        r8.ˊᐝ = r0;
        r0 = r8.ʻॱ;
        if (r0 == 0) goto L_0x0079;
    L_0x0559:
        r0 = r7.ॱॱ;
        r1 = r8.ʻॱ;
        r0 = r0.get(r1);
        r0 = (androidx.fragment.app.Fragment) r0;
        if (r0 == 0) goto L_0x0079;
    L_0x0565:
        r1 = r0.ˊˋ();
        if (r1 == 0) goto L_0x0079;
    L_0x056b:
        r8.ॱᐝ = r0;
        goto L_0x0079;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.kd.ˏ(androidx.fragment.app.Fragment, int, int, int, boolean):void");
    }

    private void ˊ(@NonNull final Fragment fragment, @NonNull e eVar, int i) {
        final View view = fragment.ॱʼ;
        final ViewGroup viewGroup = fragment.ˏˏ;
        viewGroup.startViewTransition(view);
        fragment.ˏ(i);
        if (eVar.ˎ != null) {
            Animation bVar = new b(eVar.ˎ, viewGroup, view);
            fragment.ˏ(fragment.ॱʼ);
            bVar.setAnimationListener(new AnimationListener(this) {
                final /* synthetic */ kd ˏ;

                public void onAnimationStart(Animation animation) {
                }

                public void onAnimationEnd(Animation animation) {
                    viewGroup.post(new Runnable(this) {
                        final /* synthetic */ AnonymousClass4 ॱ;

                        {
                            this.ॱ = r1;
                        }

                        public void run() {
                            if (fragment.ʻᐝ() != null) {
                                fragment.ˏ(null);
                                this.ॱ.ˏ.ˏ(fragment, fragment.ʻˊ(), 0, 0, false);
                            }
                        }
                    });
                }

                public void onAnimationRepeat(Animation animation) {
                }
            });
            fragment.ॱʼ.startAnimation(bVar);
            return;
        }
        Animator animator = eVar.ˊ;
        fragment.ˏ(eVar.ˊ);
        animator.addListener(new AnimatorListenerAdapter(this) {
            final /* synthetic */ kd ˎ;

            public void onAnimationEnd(Animator animator) {
                viewGroup.endViewTransition(view);
                Animator ʼˊ = fragment.ʼˊ();
                fragment.ˏ(null);
                if (ʼˊ != null && viewGroup.indexOfChild(view) < 0) {
                    this.ˎ.ˏ(fragment, fragment.ʻˊ(), 0, 0, false);
                }
            }
        });
        animator.setTarget(fragment.ॱʼ);
        animator.start();
    }

    void ʻ(Fragment fragment) {
        ˏ(fragment, this.ͺ, 0, 0, false);
    }

    void ʼ(Fragment fragment) {
        if (fragment.ʿ && !fragment.ʾ) {
            fragment.ˎ(fragment.ʽ(fragment.ॱˊ), null, fragment.ॱˊ);
            if (fragment.ॱʼ != null) {
                fragment.ـ = fragment.ॱʼ;
                fragment.ॱʼ.setSaveFromParentEnabled(false);
                if (fragment.ˋˋ) {
                    fragment.ॱʼ.setVisibility(8);
                }
                fragment.ˊ(fragment.ॱʼ, fragment.ॱˊ);
                ˎ(fragment, fragment.ॱʼ, fragment.ॱˊ, false);
                return;
            }
            fragment.ـ = null;
        }
    }

    void ʽ(final Fragment fragment) {
        if (fragment.ॱʼ != null) {
            e ˎ = ˎ(fragment, fragment.ꞌ(), !fragment.ˋˋ, fragment.ﾟ());
            if (ˎ == null || ˎ.ˊ == null) {
                if (ˎ != null) {
                    fragment.ॱʼ.startAnimation(ˎ.ˎ);
                    ˎ.ˎ.start();
                }
                int i = (!fragment.ˋˋ || fragment.ʽˋ()) ? 0 : 8;
                fragment.ॱʼ.setVisibility(i);
                if (fragment.ʽˋ()) {
                    fragment.ʽ(false);
                }
            } else {
                ˎ.ˊ.setTarget(fragment.ॱʼ);
                if (!fragment.ˋˋ) {
                    fragment.ॱʼ.setVisibility(0);
                } else if (fragment.ʽˋ()) {
                    fragment.ʽ(false);
                } else {
                    final ViewGroup viewGroup = fragment.ˏˏ;
                    final View view = fragment.ॱʼ;
                    viewGroup.startViewTransition(view);
                    ˎ.ˊ.addListener(new AnimatorListenerAdapter(this) {
                        final /* synthetic */ kd ˎ;

                        public void onAnimationEnd(Animator animator) {
                            viewGroup.endViewTransition(view);
                            animator.removeListener(this);
                            if (fragment.ॱʼ != null && fragment.ˋˋ) {
                                fragment.ॱʼ.setVisibility(8);
                            }
                        }
                    });
                }
                ˎ.ˊ.start();
            }
        }
        if (fragment.ᐝॱ && ʾ(fragment)) {
            this.ॱᐝ = true;
        }
        fragment.ᐨ = false;
        fragment.ॱ(fragment.ˋˋ);
    }

    void ˊॱ(Fragment fragment) {
        if (fragment != null) {
            if (this.ॱॱ.containsKey(fragment.ˊॱ)) {
                int i = this.ͺ;
                if (fragment.ʼॱ) {
                    if (fragment.ॱॱ()) {
                        i = Math.min(i, 1);
                    } else {
                        i = Math.min(i, 0);
                    }
                }
                ˏ(fragment, i, fragment.ꞌ(), fragment.ﾟ(), false);
                if (fragment.ॱʼ != null) {
                    Fragment ʿ = ʿ(fragment);
                    if (ʿ != null) {
                        View view = ʿ.ॱʼ;
                        ViewGroup viewGroup = fragment.ˏˏ;
                        int indexOfChild = viewGroup.indexOfChild(view);
                        i = viewGroup.indexOfChild(fragment.ॱʼ);
                        if (i < indexOfChild) {
                            viewGroup.removeViewAt(i);
                            viewGroup.addView(fragment.ॱʼ, indexOfChild);
                        }
                    }
                    if (fragment.ᐧ && fragment.ˏˏ != null) {
                        if (fragment.ᐝᐝ > 0.0f) {
                            fragment.ॱʼ.setAlpha(fragment.ᐝᐝ);
                        }
                        fragment.ᐝᐝ = 0.0f;
                        fragment.ᐧ = false;
                        e ˎ = ˎ(fragment, fragment.ꞌ(), true, fragment.ﾟ());
                        if (ˎ != null) {
                            if (ˎ.ˎ != null) {
                                fragment.ॱʼ.startAnimation(ˎ.ˎ);
                            } else {
                                ˎ.ˊ.setTarget(fragment.ॱʼ);
                                ˎ.ˊ.start();
                            }
                        }
                    }
                }
                if (fragment.ᐨ) {
                    ʽ(fragment);
                }
            } else if (ˎ) {
                Log.v("FragmentManager", "Ignoring moving " + fragment + " to state " + this.ͺ + "since it is not added to " + this);
            }
        }
    }

    void ॱ(int i, boolean z) {
        if (this.ˋॱ == null && i != 0) {
            throw new IllegalStateException("No activity");
        } else if (z || i != this.ͺ) {
            this.ͺ = i;
            int size = this.ʼ.size();
            for (int i2 = 0; i2 < size; i2++) {
                ˊॱ((Fragment) this.ʼ.get(i2));
            }
            for (Fragment fragment : this.ॱॱ.values()) {
                if (fragment != null && ((fragment.ʼॱ || fragment.ˋᐝ) && !fragment.ᐧ)) {
                    ˊॱ(fragment);
                }
            }
            ʻ();
            if (this.ॱᐝ && this.ˋॱ != null && this.ͺ == 4) {
                this.ˋॱ.ॱॱ();
                this.ॱᐝ = false;
            }
        }
    }

    void ʻ() {
        for (Fragment fragment : this.ॱॱ.values()) {
            if (fragment != null) {
                ᐝ(fragment);
            }
        }
    }

    void ͺ(Fragment fragment) {
        if (this.ॱॱ.get(fragment.ˊॱ) == null) {
            this.ॱॱ.put(fragment.ˊॱ, fragment);
            if (fragment.ˎˏ) {
                if (fragment.ˑ) {
                    ˎ(fragment);
                } else {
                    ॱॱ(fragment);
                }
                fragment.ˎˏ = false;
            }
            if (ˎ) {
                Log.v("FragmentManager", "Added fragment to active set " + fragment);
            }
        }
    }

    void ˋॱ(Fragment fragment) {
        if (this.ॱॱ.get(fragment.ˊॱ) != null) {
            if (ˎ) {
                Log.v("FragmentManager", "Removed fragment from active set " + fragment);
            }
            for (Fragment fragment2 : this.ॱॱ.values()) {
                if (fragment2 != null && fragment.ˊॱ.equals(fragment2.ʻॱ)) {
                    fragment2.ॱᐝ = fragment;
                    fragment2.ʻॱ = null;
                }
            }
            this.ॱॱ.put(fragment.ˊॱ, null);
            ॱॱ(fragment);
            if (fragment.ʻॱ != null) {
                fragment.ॱᐝ = (Fragment) this.ॱॱ.get(fragment.ʻॱ);
            }
            fragment.ˍ();
        }
    }

    public void ॱ(Fragment fragment, boolean z) {
        if (ˎ) {
            Log.v("FragmentManager", "add: " + fragment);
        }
        ͺ(fragment);
        if (!fragment.ˋᐝ) {
            if (this.ʼ.contains(fragment)) {
                throw new IllegalStateException("Fragment already added: " + fragment);
            }
            synchronized (this.ʼ) {
                this.ʼ.add(fragment);
            }
            fragment.ᐝॱ = true;
            fragment.ʼॱ = false;
            if (fragment.ॱʼ == null) {
                fragment.ᐨ = false;
            }
            if (ʾ(fragment)) {
                this.ॱᐝ = true;
            }
            if (z) {
                ʻ(fragment);
            }
        }
    }

    public void ˏॱ(Fragment fragment) {
        if (ˎ) {
            Log.v("FragmentManager", "remove: " + fragment + " nesting=" + fragment.ˋˊ);
        }
        boolean z = !fragment.ॱॱ();
        if (!fragment.ˋᐝ || z) {
            synchronized (this.ʼ) {
                this.ʼ.remove(fragment);
            }
            if (ʾ(fragment)) {
                this.ॱᐝ = true;
            }
            fragment.ᐝॱ = false;
            fragment.ʼॱ = true;
        }
    }

    public void ॱˊ(Fragment fragment) {
        boolean z = true;
        if (ˎ) {
            Log.v("FragmentManager", "hide: " + fragment);
        }
        if (!fragment.ˋˋ) {
            fragment.ˋˋ = true;
            if (fragment.ᐨ) {
                z = false;
            }
            fragment.ᐨ = z;
        }
    }

    public void ᐝॱ(Fragment fragment) {
        boolean z = false;
        if (ˎ) {
            Log.v("FragmentManager", "show: " + fragment);
        }
        if (fragment.ˋˋ) {
            fragment.ˋˋ = false;
            if (!fragment.ᐨ) {
                z = true;
            }
            fragment.ᐨ = z;
        }
    }

    public void ॱˎ(Fragment fragment) {
        if (ˎ) {
            Log.v("FragmentManager", "detach: " + fragment);
        }
        if (!fragment.ˋᐝ) {
            fragment.ˋᐝ = true;
            if (fragment.ᐝॱ) {
                if (ˎ) {
                    Log.v("FragmentManager", "remove from detach: " + fragment);
                }
                synchronized (this.ʼ) {
                    this.ʼ.remove(fragment);
                }
                if (ʾ(fragment)) {
                    this.ॱᐝ = true;
                }
                fragment.ᐝॱ = false;
            }
        }
    }

    public void ʻॱ(Fragment fragment) {
        if (ˎ) {
            Log.v("FragmentManager", "attach: " + fragment);
        }
        if (fragment.ˋᐝ) {
            fragment.ˋᐝ = false;
            if (!fragment.ᐝॱ) {
                if (this.ʼ.contains(fragment)) {
                    throw new IllegalStateException("Fragment already added: " + fragment);
                }
                if (ˎ) {
                    Log.v("FragmentManager", "add from attach: " + fragment);
                }
                synchronized (this.ʼ) {
                    this.ʼ.add(fragment);
                }
                fragment.ᐝॱ = true;
                if (ʾ(fragment)) {
                    this.ॱᐝ = true;
                }
            }
        }
    }

    @Nullable
    public Fragment findFragmentById(int i) {
        for (int size = this.ʼ.size() - 1; size >= 0; size--) {
            Fragment fragment = (Fragment) this.ʼ.get(size);
            if (fragment != null && fragment.ˌ == i) {
                return fragment;
            }
        }
        for (Fragment fragment2 : this.ॱॱ.values()) {
            if (fragment2 != null && fragment2.ˌ == i) {
                return fragment2;
            }
        }
        return null;
    }

    @Nullable
    public Fragment findFragmentByTag(@Nullable String str) {
        Fragment fragment;
        if (str != null) {
            for (int size = this.ʼ.size() - 1; size >= 0; size--) {
                fragment = (Fragment) this.ʼ.get(size);
                if (fragment != null && str.equals(fragment.ˎˎ)) {
                    return fragment;
                }
            }
        }
        if (str != null) {
            for (Fragment fragment2 : this.ॱॱ.values()) {
                if (fragment2 != null && str.equals(fragment2.ˎˎ)) {
                    return fragment2;
                }
            }
        }
        return null;
    }

    public Fragment ˊ(@NonNull String str) {
        for (Fragment fragment : this.ॱॱ.values()) {
            Fragment fragment2;
            if (fragment2 != null) {
                fragment2 = fragment2.ˋ(str);
                if (fragment2 != null) {
                    return fragment2;
                }
            }
        }
        return null;
    }

    private void ˋˋ() {
        if (ᐝ()) {
            throw new IllegalStateException("Can not perform this action after onSaveInstanceState");
        }
    }

    public boolean ᐝ() {
        return this.ᐝॱ || this.ॱˋ;
    }

    public void ˏ(d dVar, boolean z) {
        if (!z) {
            ˋˋ();
        }
        synchronized (this) {
            if (!this.ʾ && this.ˋॱ != null) {
                if (this.ˋ == null) {
                    this.ˋ = new ArrayList();
                }
                this.ˋ.add(dVar);
                ˋॱ();
            } else if (z) {
            } else {
                throw new IllegalStateException("Activity has been destroyed");
            }
        }
    }

    void ˋॱ() {
        Object obj = 1;
        synchronized (this) {
            Object obj2 = (this.ˋˊ == null || this.ˋˊ.isEmpty()) ? null : 1;
            if (this.ˋ == null || this.ˋ.size() != 1) {
                obj = null;
            }
            if (!(obj2 == null && r0 == null)) {
                this.ˋॱ.ˏॱ().removeCallbacks(this.ˊˊ);
                this.ˋॱ.ˏॱ().post(this.ˊˊ);
                ˉ();
            }
        }
    }

    public int ॱ(jt jtVar) {
        int size;
        synchronized (this) {
            if (this.ॱˊ == null || this.ॱˊ.size() <= 0) {
                if (this.ʽ == null) {
                    this.ʽ = new ArrayList();
                }
                size = this.ʽ.size();
                if (ˎ) {
                    Log.v("FragmentManager", "Setting back stack index " + size + " to " + jtVar);
                }
                this.ʽ.add(jtVar);
            } else {
                size = ((Integer) this.ॱˊ.remove(this.ॱˊ.size() - 1)).intValue();
                if (ˎ) {
                    Log.v("FragmentManager", "Adding back stack index " + size + " with " + jtVar);
                }
                this.ʽ.set(size, jtVar);
            }
        }
        return size;
    }

    public void ˎ(int i, jt jtVar) {
        synchronized (this) {
            if (this.ʽ == null) {
                this.ʽ = new ArrayList();
            }
            int size = this.ʽ.size();
            if (i < size) {
                if (ˎ) {
                    Log.v("FragmentManager", "Setting back stack index " + i + " to " + jtVar);
                }
                this.ʽ.set(i, jtVar);
            } else {
                while (size < i) {
                    this.ʽ.add(null);
                    if (this.ॱˊ == null) {
                        this.ॱˊ = new ArrayList();
                    }
                    if (ˎ) {
                        Log.v("FragmentManager", "Adding available back stack index " + size);
                    }
                    this.ॱˊ.add(Integer.valueOf(size));
                    size++;
                }
                if (ˎ) {
                    Log.v("FragmentManager", "Adding back stack index " + i + " with " + jtVar);
                }
                this.ʽ.add(jtVar);
            }
        }
    }

    public void ˏ(int i) {
        synchronized (this) {
            this.ʽ.set(i, null);
            if (this.ॱˊ == null) {
                this.ॱˊ = new ArrayList();
            }
            if (ˎ) {
                Log.v("FragmentManager", "Freeing back stack index " + i);
            }
            this.ॱˊ.add(Integer.valueOf(i));
        }
    }

    private void ˋ(boolean z) {
        if (this.ॱ) {
            throw new IllegalStateException("FragmentManager is already executing transactions");
        } else if (this.ˋॱ == null) {
            throw new IllegalStateException("Fragment host has been destroyed");
        } else if (Looper.myLooper() != this.ˋॱ.ˏॱ().getLooper()) {
            throw new IllegalStateException("Must be called from main thread of fragment host");
        } else {
            if (!z) {
                ˋˋ();
            }
            if (this.ʼॱ == null) {
                this.ʼॱ = new ArrayList();
                this.ʽॱ = new ArrayList();
            }
            this.ॱ = true;
            try {
                ॱ(null, null);
            } finally {
                this.ॱ = false;
            }
        }
    }

    public void ˋ(d dVar, boolean z) {
        if (!z || (this.ˋॱ != null && !this.ʾ)) {
            ˋ(z);
            if (dVar.ॱ(this.ʼॱ, this.ʽॱ)) {
                this.ॱ = true;
                try {
                    ˏ(this.ʼॱ, this.ʽॱ);
                } finally {
                    ˋᐝ();
                }
            }
            ˉ();
            ˏॱ();
            ˍ();
        }
    }

    private void ˋᐝ() {
        this.ॱ = false;
        this.ʽॱ.clear();
        this.ʼॱ.clear();
    }

    private void ॱ(ArrayList<jt> arrayList, ArrayList<Boolean> arrayList2) {
        int i;
        if (this.ˋˊ == null) {
            i = 0;
        } else {
            i = this.ˋˊ.size();
        }
        int i2 = 0;
        int i3 = i;
        while (i2 < i3) {
            int indexOf;
            j jVar = (j) this.ˋˊ.get(i2);
            if (!(arrayList == null || jVar.ˊ)) {
                indexOf = arrayList.indexOf(jVar.ॱ);
                if (indexOf != -1 && ((Boolean) arrayList2.get(indexOf)).booleanValue()) {
                    this.ˋˊ.remove(i2);
                    indexOf = i2 - 1;
                    i2 = i3 - 1;
                    jVar.ˊ();
                    i = indexOf;
                    indexOf = i2;
                    i2 = i + 1;
                    i3 = indexOf;
                }
            }
            if (jVar.ˋ() || (arrayList != null && jVar.ॱ.ॱ((ArrayList) arrayList, 0, arrayList.size()))) {
                this.ˋˊ.remove(i2);
                i2--;
                i3--;
                if (!(arrayList == null || jVar.ˊ)) {
                    indexOf = arrayList.indexOf(jVar.ॱ);
                    if (indexOf != -1 && ((Boolean) arrayList2.get(indexOf)).booleanValue()) {
                        jVar.ˊ();
                        i = i2;
                        indexOf = i3;
                        i2 = i + 1;
                        i3 = indexOf;
                    }
                }
                jVar.ˎ();
            }
            i = i2;
            indexOf = i3;
            i2 = i + 1;
            i3 = indexOf;
        }
    }

    private void ˏ(ArrayList<jt> arrayList, ArrayList<Boolean> arrayList2) {
        int i = 0;
        if (arrayList != null && !arrayList.isEmpty()) {
            if (arrayList2 == null || arrayList.size() != arrayList2.size()) {
                throw new IllegalStateException("Internal error with the back stack records");
            }
            ॱ((ArrayList) arrayList, (ArrayList) arrayList2);
            int size = arrayList.size();
            int i2 = 0;
            while (i < size) {
                int i3;
                if (((jt) arrayList.get(i)).ॱᐝ) {
                    i3 = i;
                } else {
                    if (i2 != i) {
                        ॱ((ArrayList) arrayList, (ArrayList) arrayList2, i2, i);
                    }
                    i2 = i + 1;
                    if (((Boolean) arrayList2.get(i)).booleanValue()) {
                        while (i2 < size && ((Boolean) arrayList2.get(i2)).booleanValue() && !((jt) arrayList.get(i2)).ॱᐝ) {
                            i2++;
                        }
                    }
                    i3 = i2;
                    ॱ((ArrayList) arrayList, (ArrayList) arrayList2, i, i3);
                    i2 = i3;
                    i3--;
                }
                i = i3 + 1;
            }
            if (i2 != size) {
                ॱ((ArrayList) arrayList, (ArrayList) arrayList2, i2, size);
            }
        }
    }

    private void ॱ(ArrayList<jt> arrayList, ArrayList<Boolean> arrayList2, int i, int i2) {
        int ˊ;
        boolean z = ((jt) arrayList.get(i)).ॱᐝ;
        if (this.ʿ == null) {
            this.ʿ = new ArrayList();
        } else {
            this.ʿ.clear();
        }
        this.ʿ.addAll(this.ʼ);
        int i3 = i;
        Fragment ˊᐝ = ˊᐝ();
        boolean z2 = false;
        while (i3 < i2) {
            Fragment ˎ;
            boolean z3;
            jt jtVar = (jt) arrayList.get(i3);
            if (((Boolean) arrayList2.get(i3)).booleanValue()) {
                ˎ = jtVar.ˎ(this.ʿ, ˊᐝ);
            } else {
                ˎ = jtVar.ˋ(this.ʿ, ˊᐝ);
            }
            if (z2 || jtVar.ˋॱ) {
                z3 = true;
            } else {
                z3 = false;
            }
            i3++;
            ˊᐝ = ˎ;
            z2 = z3;
        }
        this.ʿ.clear();
        if (!z) {
            kb.ˎ(this, arrayList, arrayList2, i, i2, false);
        }
        ˏ(arrayList, arrayList2, i, i2);
        if (z) {
            dq dqVar = new dq();
            ˏ(dqVar);
            ˊ = ˊ(arrayList, arrayList2, i, i2, dqVar);
            ॱ(dqVar);
        } else {
            ˊ = i2;
        }
        if (ˊ != i && z) {
            kb.ˎ(this, arrayList, arrayList2, i, ˊ, true);
            ॱ(this.ͺ, true);
        }
        while (i < i2) {
            jtVar = (jt) arrayList.get(i);
            if (((Boolean) arrayList2.get(i)).booleanValue() && jtVar.ॱ >= 0) {
                ˏ(jtVar.ॱ);
                jtVar.ॱ = -1;
            }
            jtVar.ॱ();
            i++;
        }
        if (z2) {
            ͺ();
        }
    }

    private void ॱ(dq<Fragment> dqVar) {
        int size = dqVar.size();
        for (int i = 0; i < size; i++) {
            Fragment fragment = (Fragment) dqVar.ॱ(i);
            if (!fragment.ᐝॱ) {
                View ˊˊ = fragment.ˊˊ();
                fragment.ᐝᐝ = ˊˊ.getAlpha();
                ˊˊ.setAlpha(0.0f);
            }
        }
    }

    private int ˊ(ArrayList<jt> arrayList, ArrayList<Boolean> arrayList2, int i, int i2, dq<Fragment> dqVar) {
        int i3 = i2 - 1;
        int i4 = i2;
        while (i3 >= i) {
            boolean z;
            int i5;
            jt jtVar = (jt) arrayList.get(i3);
            boolean booleanValue = ((Boolean) arrayList2.get(i3)).booleanValue();
            if (!jtVar.ʼ() || jtVar.ॱ((ArrayList) arrayList, i3 + 1, i2)) {
                z = false;
            } else {
                z = true;
            }
            if (z) {
                if (this.ˋˊ == null) {
                    this.ˋˊ = new ArrayList();
                }
                androidx.fragment.app.Fragment.a jVar = new j(jtVar, booleanValue);
                this.ˋˊ.add(jVar);
                jtVar.ˏ(jVar);
                if (booleanValue) {
                    jtVar.getValueRefName();
                } else {
                    jtVar.ˏ(false);
                }
                int i6 = i4 - 1;
                if (i3 != i6) {
                    arrayList.remove(i3);
                    arrayList.add(i6, jtVar);
                }
                ˏ((dq) dqVar);
                i5 = i6;
            } else {
                i5 = i4;
            }
            i3--;
            i4 = i5;
        }
        return i4;
    }

    void ॱ(jt jtVar, boolean z, boolean z2, boolean z3) {
        if (z) {
            jtVar.ˏ(z3);
        } else {
            jtVar.getValueRefName();
        }
        ArrayList arrayList = new ArrayList(1);
        ArrayList arrayList2 = new ArrayList(1);
        arrayList.add(jtVar);
        arrayList2.add(Boolean.valueOf(z));
        if (z2) {
            kb.ˎ(this, arrayList, arrayList2, 0, 1, true);
        }
        if (z3) {
            ॱ(this.ͺ, true);
        }
        for (Fragment fragment : this.ॱॱ.values()) {
            if (fragment != null && fragment.ॱʼ != null && fragment.ᐧ && jtVar.ˋ(fragment.ˍ)) {
                if (fragment.ᐝᐝ > 0.0f) {
                    fragment.ॱʼ.setAlpha(fragment.ᐝᐝ);
                }
                if (z3) {
                    fragment.ᐝᐝ = 0.0f;
                } else {
                    fragment.ᐝᐝ = SizeModifier.STABLE_STATE_SCALE;
                    fragment.ᐧ = false;
                }
            }
        }
    }

    private Fragment ʿ(Fragment fragment) {
        ViewGroup viewGroup = fragment.ˏˏ;
        View view = fragment.ॱʼ;
        if (viewGroup == null || view == null) {
            return null;
        }
        for (int indexOf = this.ʼ.indexOf(fragment) - 1; indexOf >= 0; indexOf--) {
            Fragment fragment2 = (Fragment) this.ʼ.get(indexOf);
            if (fragment2.ˏˏ == viewGroup && fragment2.ॱʼ != null) {
                return fragment2;
            }
        }
        return null;
    }

    private static void ˏ(ArrayList<jt> arrayList, ArrayList<Boolean> arrayList2, int i, int i2) {
        while (i < i2) {
            jt jtVar = (jt) arrayList.get(i);
            if (((Boolean) arrayList2.get(i)).booleanValue()) {
                jtVar.ˏ(-1);
                jtVar.ˏ(i == i2 + -1);
            } else {
                jtVar.ˏ(1);
                jtVar.getValueRefName();
            }
            i++;
        }
    }

    private void ˏ(dq<Fragment> dqVar) {
        if (this.ͺ >= 1) {
            int min = Math.min(this.ͺ, 3);
            int size = this.ʼ.size();
            for (int i = 0; i < size; i++) {
                Fragment fragment = (Fragment) this.ʼ.get(i);
                if (fragment.ͺ < min) {
                    ˏ(fragment, min, fragment.ʹ(), fragment.ꞌ(), false);
                    if (!(fragment.ॱʼ == null || fragment.ˋˋ || !fragment.ᐧ)) {
                        dqVar.add(fragment);
                    }
                }
            }
        }
    }

    private void ˌ() {
        if (this.ˋˊ != null) {
            while (!this.ˋˊ.isEmpty()) {
                ((j) this.ˋˊ.remove(0)).ˎ();
            }
        }
    }

    private void ˎˎ() {
        for (Fragment fragment : this.ॱॱ.values()) {
            if (fragment != null) {
                if (fragment.ʻᐝ() != null) {
                    int ʻˊ = fragment.ʻˊ();
                    View ʻᐝ = fragment.ʻᐝ();
                    Animation animation = ʻᐝ.getAnimation();
                    if (animation != null) {
                        animation.cancel();
                        ʻᐝ.clearAnimation();
                    }
                    fragment.ˏ(null);
                    ˏ(fragment, ʻˊ, 0, 0, false);
                } else if (fragment.ʼˊ() != null) {
                    fragment.ʼˊ().end();
                }
            }
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private boolean ˊ(java.util.ArrayList<o.jt> r5, java.util.ArrayList<java.lang.Boolean> r6) {
        /*
        r4 = this;
        r0 = 0;
        monitor-enter(r4);
        r1 = r4.ˋ;	 Catch:{ all -> 0x003e }
        if (r1 == 0) goto L_0x000e;
    L_0x0006:
        r1 = r4.ˋ;	 Catch:{ all -> 0x003e }
        r1 = r1.size();	 Catch:{ all -> 0x003e }
        if (r1 != 0) goto L_0x0010;
    L_0x000e:
        monitor-exit(r4);	 Catch:{ all -> 0x003e }
    L_0x000f:
        return r0;
    L_0x0010:
        r1 = r4.ˋ;	 Catch:{ all -> 0x003e }
        r3 = r1.size();	 Catch:{ all -> 0x003e }
        r2 = r0;
        r1 = r0;
    L_0x0018:
        if (r2 >= r3) goto L_0x002b;
    L_0x001a:
        r0 = r4.ˋ;	 Catch:{ all -> 0x003e }
        r0 = r0.get(r2);	 Catch:{ all -> 0x003e }
        r0 = (o.kd.d) r0;	 Catch:{ all -> 0x003e }
        r0 = r0.ॱ(r5, r6);	 Catch:{ all -> 0x003e }
        r1 = r1 | r0;
        r0 = r2 + 1;
        r2 = r0;
        goto L_0x0018;
    L_0x002b:
        r0 = r4.ˋ;	 Catch:{ all -> 0x003e }
        r0.clear();	 Catch:{ all -> 0x003e }
        r0 = r4.ˋॱ;	 Catch:{ all -> 0x003e }
        r0 = r0.ˏॱ();	 Catch:{ all -> 0x003e }
        r2 = r4.ˊˊ;	 Catch:{ all -> 0x003e }
        r0.removeCallbacks(r2);	 Catch:{ all -> 0x003e }
        monitor-exit(r4);	 Catch:{ all -> 0x003e }
        r0 = r1;
        goto L_0x000f;
    L_0x003e:
        r0 = move-exception;
        monitor-exit(r4);	 Catch:{ all -> 0x003e }
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.kd.ˊ(java.util.ArrayList, java.util.ArrayList):boolean");
    }

    void ˏॱ() {
        if (this.ˈ) {
            this.ˈ = false;
            ʻ();
        }
    }

    void ͺ() {
        if (this.ˏॱ != null) {
            for (int i = 0; i < this.ˏॱ.size(); i++) {
                ((o.ju.c) this.ˏॱ.get(i)).ˋ();
            }
        }
    }

    void ˎ(jt jtVar) {
        if (this.ʻ == null) {
            this.ʻ = new ArrayList();
        }
        this.ʻ.add(jtVar);
    }

    boolean ˎ(ArrayList<jt> arrayList, ArrayList<Boolean> arrayList2, String str, int i, int i2) {
        if (this.ʻ == null) {
            return false;
        }
        int size;
        if (str == null && i < 0 && (i2 & 1) == 0) {
            size = this.ʻ.size() - 1;
            if (size < 0) {
                return false;
            }
            arrayList.add(this.ʻ.remove(size));
            arrayList2.add(Boolean.valueOf(true));
        } else {
            int size2;
            size = -1;
            if (str != null || i >= 0) {
                jt jtVar;
                size2 = this.ʻ.size() - 1;
                while (size2 >= 0) {
                    jtVar = (jt) this.ʻ.get(size2);
                    if ((str != null && str.equals(jtVar.ॱॱ())) || (i >= 0 && i == jtVar.ॱ)) {
                        break;
                    }
                    size2--;
                }
                if (size2 < 0) {
                    return false;
                }
                if ((i2 & 1) != 0) {
                    size2--;
                    while (size2 >= 0) {
                        jtVar = (jt) this.ʻ.get(size2);
                        if ((str == null || !str.equals(jtVar.ॱॱ())) && (i < 0 || i != jtVar.ॱ)) {
                            break;
                        }
                        size2--;
                    }
                }
                size = size2;
            }
            if (size == this.ʻ.size() - 1) {
                return false;
            }
            for (size2 = this.ʻ.size() - 1; size2 > size; size2--) {
                arrayList.add(this.ʻ.remove(size2));
                arrayList2.add(Boolean.valueOf(true));
            }
        }
        return true;
    }

    void ॱᐝ(Fragment fragment) {
        if (fragment.ـ != null) {
            if (this.ˊᐝ == null) {
                this.ˊᐝ = new SparseArray();
            } else {
                this.ˊᐝ.clear();
            }
            fragment.ـ.saveHierarchyState(this.ˊᐝ);
            if (this.ˊᐝ.size() > 0) {
                fragment.ˏॱ = this.ˊᐝ;
                this.ˊᐝ = null;
            }
        }
    }

    Bundle ॱˋ(Fragment fragment) {
        Bundle bundle;
        if (this.ˊˋ == null) {
            this.ˊˋ = new Bundle();
        }
        fragment.ˊॱ(this.ˊˋ);
        ˎ(fragment, this.ˊˋ, false);
        if (this.ˊˋ.isEmpty()) {
            bundle = null;
        } else {
            bundle = this.ˊˋ;
            this.ˊˋ = null;
        }
        if (fragment.ॱʼ != null) {
            ॱᐝ(fragment);
        }
        if (fragment.ˏॱ != null) {
            if (bundle == null) {
                bundle = new Bundle();
            }
            bundle.putSparseParcelableArray("android:view_state", fragment.ˏॱ);
        }
        if (!fragment.ॱͺ) {
            if (bundle == null) {
                bundle = new Bundle();
            }
            bundle.putBoolean("android:user_visible_hint", fragment.ॱͺ);
        }
        return bundle;
    }

    public Parcelable ˊॱ() {
        int i = 0;
        BackStackState[] backStackStateArr = null;
        ˌ();
        ˎˎ();
        ॱˊ();
        this.ᐝॱ = true;
        if (this.ॱॱ.isEmpty()) {
            return null;
        }
        Fragment fragment;
        ArrayList arrayList = new ArrayList(this.ॱॱ.size());
        boolean z = false;
        for (Fragment fragment2 : this.ॱॱ.values()) {
            boolean z2;
            if (fragment2 != null) {
                if (fragment2.ˊᐝ != this) {
                    ˊ(new IllegalStateException("Failure saving state: active " + fragment2 + " was removed from the FragmentManager"));
                }
                FragmentState fragmentState = new FragmentState(fragment2);
                arrayList.add(fragmentState);
                if (fragment2.ͺ <= 0 || fragmentState.ˋॱ != null) {
                    fragmentState.ˋॱ = fragment2.ॱˊ;
                } else {
                    fragmentState.ˋॱ = ॱˋ(fragment2);
                    if (fragment2.ʻॱ != null) {
                        Fragment fragment3 = (Fragment) this.ॱॱ.get(fragment2.ʻॱ);
                        if (fragment3 == null) {
                            ˊ(new IllegalStateException("Failure saving state: " + fragment2 + " has target not in fragment manager: " + fragment2.ʻॱ));
                        }
                        if (fragmentState.ˋॱ == null) {
                            fragmentState.ˋॱ = new Bundle();
                        }
                        ˋ(fragmentState.ˋॱ, "android:target_state", fragment3);
                        if (fragment2.ॱˋ != 0) {
                            fragmentState.ˋॱ.putInt("android:target_req_state", fragment2.ॱˋ);
                        }
                    }
                }
                if (ˎ) {
                    Log.v("FragmentManager", "Saved state of " + fragment2 + ": " + fragmentState.ˋॱ);
                }
                z2 = true;
            } else {
                z2 = z;
            }
            z = z2;
        }
        if (z) {
            ArrayList arrayList2;
            int size = this.ʼ.size();
            if (size > 0) {
                arrayList2 = new ArrayList(size);
                Iterator it = this.ʼ.iterator();
                while (it.hasNext()) {
                    fragment2 = (Fragment) it.next();
                    arrayList2.add(fragment2.ˊॱ);
                    if (fragment2.ˊᐝ != this) {
                        ˊ(new IllegalStateException("Failure saving state: active " + fragment2 + " was removed from the FragmentManager"));
                    }
                    if (ˎ) {
                        Log.v("FragmentManager", "saveAllState: adding fragment (" + fragment2.ˊॱ + "): " + fragment2);
                    }
                }
            } else {
                arrayList2 = null;
            }
            if (this.ʻ != null) {
                int size2 = this.ʻ.size();
                if (size2 > 0) {
                    backStackStateArr = new BackStackState[size2];
                    while (i < size2) {
                        backStackStateArr[i] = new BackStackState((jt) this.ʻ.get(i));
                        if (ˎ) {
                            Log.v("FragmentManager", "saveAllState: adding back stack #" + i + ": " + this.ʻ.get(i));
                        }
                        i++;
                    }
                }
            }
            FragmentManagerState fragmentManagerState = new FragmentManagerState();
            fragmentManagerState.ˎ = arrayList;
            fragmentManagerState.ˏ = arrayList2;
            fragmentManagerState.ˋ = backStackStateArr;
            if (this.ʻॱ != null) {
                fragmentManagerState.ˊ = this.ʻॱ.ˊॱ;
            }
            fragmentManagerState.ॱ = this.ˊ;
            return fragmentManagerState;
        } else if (!ˎ) {
            return null;
        } else {
            Log.v("FragmentManager", "saveAllState: no fragments!");
            return null;
        }
    }

    public void ˎ(Parcelable parcelable) {
        if (parcelable != null) {
            FragmentManagerState fragmentManagerState = (FragmentManagerState) parcelable;
            if (fragmentManagerState.ˎ != null) {
                Fragment fragment;
                Iterator it;
                FragmentState fragmentState;
                for (Fragment fragment2 : this.ˍ.ˋ()) {
                    FragmentState fragmentState2;
                    if (ˎ) {
                        Log.v("FragmentManager", "restoreSaveState: re-attaching retained " + fragment2);
                    }
                    it = fragmentManagerState.ˎ.iterator();
                    while (it.hasNext()) {
                        fragmentState = (FragmentState) it.next();
                        if (fragmentState.ˎ.equals(fragment2.ˊॱ)) {
                            fragmentState2 = fragmentState;
                            break;
                        }
                    }
                    fragmentState2 = null;
                    if (fragmentState2 == null) {
                        if (ˎ) {
                            Log.v("FragmentManager", "Discarding retained Fragment " + fragment2 + " that was not found in the set of active Fragments " + fragmentManagerState.ˎ);
                        }
                        ˏ(fragment2, 1, 0, 0, false);
                        fragment2.ʼॱ = true;
                        ˏ(fragment2, 0, 0, 0, false);
                    } else {
                        fragmentState2.ˊॱ = fragment2;
                        fragment2.ˏॱ = null;
                        fragment2.ˋˊ = 0;
                        fragment2.ʽॱ = false;
                        fragment2.ᐝॱ = false;
                        fragment2.ʻॱ = fragment2.ॱᐝ != null ? fragment2.ॱᐝ.ˊॱ : null;
                        fragment2.ॱᐝ = null;
                        if (fragmentState2.ˋॱ != null) {
                            fragmentState2.ˋॱ.setClassLoader(this.ˋॱ.ˋॱ().getClassLoader());
                            fragment2.ˏॱ = fragmentState2.ˋॱ.getSparseParcelableArray("android:view_state");
                            fragment2.ॱˊ = fragmentState2.ˋॱ;
                        }
                    }
                }
                this.ॱॱ.clear();
                Iterator it2 = fragmentManagerState.ˎ.iterator();
                while (it2.hasNext()) {
                    fragmentState = (FragmentState) it2.next();
                    if (fragmentState != null) {
                        Fragment ˋ = fragmentState.ˋ(this.ˋॱ.ˋॱ().getClassLoader(), ˋ());
                        ˋ.ˊᐝ = this;
                        if (ˎ) {
                            Log.v("FragmentManager", "restoreSaveState: active (" + ˋ.ˊॱ + "): " + ˋ);
                        }
                        this.ॱॱ.put(ˋ.ˊॱ, ˋ);
                        fragmentState.ˊॱ = null;
                    }
                }
                this.ʼ.clear();
                if (fragmentManagerState.ˏ != null) {
                    it = fragmentManagerState.ˏ.iterator();
                    while (it.hasNext()) {
                        String str = (String) it.next();
                        fragment2 = (Fragment) this.ॱॱ.get(str);
                        if (fragment2 == null) {
                            ˊ(new IllegalStateException("No instantiated fragment for (" + str + ")"));
                        }
                        fragment2.ᐝॱ = true;
                        if (ˎ) {
                            Log.v("FragmentManager", "restoreSaveState: added (" + str + "): " + fragment2);
                        }
                        if (this.ʼ.contains(fragment2)) {
                            throw new IllegalStateException("Already added " + fragment2);
                        }
                        synchronized (this.ʼ) {
                            this.ʼ.add(fragment2);
                        }
                    }
                }
                if (fragmentManagerState.ˋ != null) {
                    this.ʻ = new ArrayList(fragmentManagerState.ˋ.length);
                    for (int i = 0; i < fragmentManagerState.ˋ.length; i++) {
                        jt ˎ = fragmentManagerState.ˋ[i].ˎ(this);
                        if (ˎ) {
                            Log.v("FragmentManager", "restoreAllState: back stack #" + i + " (index " + ˎ.ॱ + "): " + ˎ);
                            PrintWriter printWriter = new PrintWriter(new gy("FragmentManager"));
                            ˎ.ॱ("  ", printWriter, false);
                            printWriter.close();
                        }
                        this.ʻ.add(ˎ);
                        if (ˎ.ॱ >= 0) {
                            ˎ(ˎ.ॱ, ˎ);
                        }
                    }
                } else {
                    this.ʻ = null;
                }
                if (fragmentManagerState.ˊ != null) {
                    this.ʻॱ = (Fragment) this.ॱॱ.get(fragmentManagerState.ˊ);
                    ʼॱ(this.ʻॱ);
                }
                this.ˊ = fragmentManagerState.ॱ;
            }
        }
    }

    private void ˍ() {
        this.ॱॱ.values().removeAll(Collections.singleton(null));
    }

    public void ॱ(@NonNull jv jvVar, @NonNull jx jxVar, @Nullable Fragment fragment) {
        if (this.ˋॱ != null) {
            throw new IllegalStateException("Already attached");
        }
        this.ˋॱ = jvVar;
        this.ˊॱ = jxVar;
        this.ॱˎ = fragment;
        if (this.ॱˎ != null) {
            ˉ();
        }
        if (jvVar instanceof ai) {
            kv kvVar = (ai) jvVar;
            this.ˎˎ = kvVar.ॱ();
            if (fragment != null) {
                kvVar = fragment;
            }
            this.ˎˎ.ˎ(kvVar, this.ˌ);
        }
        if (fragment != null) {
            this.ˍ = fragment.ˊᐝ.ॱ(fragment);
        } else if (jvVar instanceof lg) {
            this.ˍ = jz.ˎ(((lg) jvVar).U_());
        } else {
            this.ˍ = new jz(false);
        }
    }

    public void ॱˎ() {
        this.ᐝॱ = false;
        this.ॱˋ = false;
        int size = this.ʼ.size();
        for (int i = 0; i < size; i++) {
            Fragment fragment = (Fragment) this.ʼ.get(i);
            if (fragment != null) {
                fragment.ᐝᐝ();
            }
        }
    }

    public void ॱᐝ() {
        this.ᐝॱ = false;
        this.ॱˋ = false;
        ॱ(1);
    }

    public void ʻॱ() {
        this.ᐝॱ = false;
        this.ॱˋ = false;
        ॱ(2);
    }

    public void ᐝॱ() {
        this.ᐝॱ = false;
        this.ॱˋ = false;
        ॱ(3);
    }

    public void ॱˋ() {
        this.ᐝॱ = false;
        this.ॱˋ = false;
        ॱ(4);
    }

    public void ʿ() {
        ॱ(3);
    }

    public void ʾ() {
        this.ॱˋ = true;
        ॱ(2);
    }

    public void ˈ() {
        ॱ(1);
    }

    public void ʼॱ() {
        this.ʾ = true;
        ॱˊ();
        ॱ(0);
        this.ˋॱ = null;
        this.ˊॱ = null;
        this.ॱˎ = null;
        if (this.ˎˎ != null) {
            this.ˌ.ˎ();
            this.ˎˎ = null;
        }
    }

    private void ॱ(int i) {
        try {
            this.ॱ = true;
            ॱ(i, false);
            ॱˊ();
        } finally {
            this.ॱ = false;
        }
    }

    public void ॱ(boolean z) {
        for (int size = this.ʼ.size() - 1; size >= 0; size--) {
            Fragment fragment = (Fragment) this.ʼ.get(size);
            if (fragment != null) {
                fragment.ʼ(z);
            }
        }
    }

    public void ˊ(boolean z) {
        for (int size = this.ʼ.size() - 1; size >= 0; size--) {
            Fragment fragment = (Fragment) this.ʼ.get(size);
            if (fragment != null) {
                fragment.ʻ(z);
            }
        }
    }

    public void ˏ(@NonNull Configuration configuration) {
        for (int i = 0; i < this.ʼ.size(); i++) {
            Fragment fragment = (Fragment) this.ʼ.get(i);
            if (fragment != null) {
                fragment.ˋ(configuration);
            }
        }
    }

    public void ʽॱ() {
        for (int i = 0; i < this.ʼ.size(); i++) {
            Fragment fragment = (Fragment) this.ʼ.get(i);
            if (fragment != null) {
                fragment.ㆍ();
            }
        }
    }

    public boolean ˊ(@NonNull Menu menu, @NonNull MenuInflater menuInflater) {
        int i = 0;
        if (this.ͺ < 1) {
            return false;
        }
        ArrayList arrayList = null;
        int i2 = 0;
        boolean z = false;
        while (i2 < this.ʼ.size()) {
            boolean z2;
            Fragment fragment = (Fragment) this.ʼ.get(i2);
            if (fragment == null || !fragment.ˋ(menu, menuInflater)) {
                z2 = z;
            } else {
                if (arrayList == null) {
                    arrayList = new ArrayList();
                }
                arrayList.add(fragment);
                z2 = true;
            }
            i2++;
            z = z2;
        }
        if (this.ᐝ != null) {
            while (i < this.ᐝ.size()) {
                fragment = (Fragment) this.ᐝ.get(i);
                if (arrayList == null || !arrayList.contains(fragment)) {
                    fragment.ˋˋ();
                }
                i++;
            }
        }
        this.ᐝ = arrayList;
        return z;
    }

    public boolean ˊ(@NonNull Menu menu) {
        if (this.ͺ < 1) {
            return false;
        }
        boolean z = false;
        for (int i = 0; i < this.ʼ.size(); i++) {
            Fragment fragment = (Fragment) this.ʼ.get(i);
            if (fragment != null && fragment.ˏ(menu)) {
                z = true;
            }
        }
        return z;
    }

    public boolean ˊ(@NonNull MenuItem menuItem) {
        if (this.ͺ < 1) {
            return false;
        }
        for (int i = 0; i < this.ʼ.size(); i++) {
            Fragment fragment = (Fragment) this.ʼ.get(i);
            if (fragment != null && fragment.ˏ(menuItem)) {
                return true;
            }
        }
        return false;
    }

    public boolean ˏ(@NonNull MenuItem menuItem) {
        if (this.ͺ < 1) {
            return false;
        }
        for (int i = 0; i < this.ʼ.size(); i++) {
            Fragment fragment = (Fragment) this.ʼ.get(i);
            if (fragment != null && fragment.ˋ(menuItem)) {
                return true;
            }
        }
        return false;
    }

    public void ॱ(@NonNull Menu menu) {
        if (this.ͺ >= 1) {
            for (int i = 0; i < this.ʼ.size(); i++) {
                Fragment fragment = (Fragment) this.ʼ.get(i);
                if (fragment != null) {
                    fragment.ˎ(menu);
                }
            }
        }
    }

    public void ʽॱ(Fragment fragment) {
        if (fragment == null || (this.ॱॱ.get(fragment.ˊॱ) == fragment && (fragment.ˊˊ == null || fragment.ॱᐝ() == this))) {
            Fragment fragment2 = this.ʻॱ;
            this.ʻॱ = fragment;
            ʼॱ(fragment2);
            ʼॱ(this.ʻॱ);
            return;
        }
        throw new IllegalArgumentException("Fragment " + fragment + " is not an active fragment of FragmentManager " + this);
    }

    private void ʼॱ(@Nullable Fragment fragment) {
        if (fragment != null && this.ॱॱ.get(fragment.ˊॱ) == fragment) {
            fragment.ᐧ();
        }
    }

    public void ˊˋ() {
        ˉ();
        ʼॱ(this.ʻॱ);
    }

    @Nullable
    public Fragment ˊᐝ() {
        return this.ʻॱ;
    }

    public void ˋ(Fragment fragment, o.kp.c cVar) {
        if (this.ॱॱ.get(fragment.ˊॱ) == fragment && (fragment.ˊˊ == null || fragment.ॱᐝ() == this)) {
            fragment.ꜞ = cVar;
            return;
        }
        throw new IllegalArgumentException("Fragment " + fragment + " is not an active fragment of FragmentManager " + this);
    }

    @NonNull
    public jy ˋ() {
        if (super.ˋ() == ˏ) {
            if (this.ॱˎ != null) {
                return this.ॱˎ.ˊᐝ.ˋ();
            }
            ˋ(new jy(this) {
                final /* synthetic */ kd ˊ;

                {
                    this.ˊ = r1;
                }

                @NonNull
                public Fragment ॱ(@NonNull ClassLoader classLoader, @NonNull String str) {
                    return this.ˊ.ˋॱ.ˎ(this.ˊ.ˋॱ.ˋॱ(), str, null);
                }
            });
        }
        return super.ˋ();
    }

    void ॱ(@NonNull Fragment fragment, @NonNull Context context, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ॱ(fragment, context, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˏ((FragmentManager) this, fragment, context);
            }
        }
    }

    void ˎ(@NonNull Fragment fragment, @NonNull Context context, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˎ(fragment, context, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˊ((FragmentManager) this, fragment, context);
            }
        }
    }

    void ˊ(@NonNull Fragment fragment, @Nullable Bundle bundle, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˊ(fragment, bundle, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˎ(this, fragment, bundle);
            }
        }
    }

    void ˋ(@NonNull Fragment fragment, @Nullable Bundle bundle, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˋ(fragment, bundle, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˏ((FragmentManager) this, fragment, bundle);
            }
        }
    }

    void ˏ(@NonNull Fragment fragment, @Nullable Bundle bundle, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˏ(fragment, bundle, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ॱ(this, fragment, bundle);
            }
        }
    }

    void ˎ(@NonNull Fragment fragment, @NonNull View view, @Nullable Bundle bundle, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˎ(fragment, view, bundle, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˏ(this, fragment, view, bundle);
            }
        }
    }

    void ˏ(@NonNull Fragment fragment, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˏ(fragment, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˋ(this, fragment);
            }
        }
    }

    void ˎ(@NonNull Fragment fragment, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˎ(fragment, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ॱ(this, fragment);
            }
        }
    }

    void ˋ(@NonNull Fragment fragment, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˋ(fragment, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˎ(this, fragment);
            }
        }
    }

    void ˊ(@NonNull Fragment fragment, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˊ(fragment, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˏ(this, fragment);
            }
        }
    }

    void ˎ(@NonNull Fragment fragment, @NonNull Bundle bundle, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ˎ(fragment, bundle, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˊ((FragmentManager) this, fragment, bundle);
            }
        }
    }

    void ॱॱ(@NonNull Fragment fragment, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ॱॱ(fragment, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ˊ(this, fragment);
            }
        }
    }

    void ʻ(@NonNull Fragment fragment, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ʻ(fragment, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ᐝ(this, fragment);
            }
        }
    }

    void ᐝ(@NonNull Fragment fragment, boolean z) {
        if (this.ॱˎ != null) {
            FragmentManager ॱᐝ = this.ॱˎ.ॱᐝ();
            if (ॱᐝ instanceof kd) {
                ((kd) ॱᐝ).ᐝ(fragment, true);
            }
        }
        Iterator it = this.ˋᐝ.iterator();
        while (it.hasNext()) {
            c cVar = (c) it.next();
            if (!z || cVar.ˎ) {
                cVar.ॱ.ʻ(this, fragment);
            }
        }
    }

    boolean ˋˊ() {
        boolean z = false;
        for (Fragment fragment : this.ॱॱ.values()) {
            boolean ʾ;
            if (fragment != null) {
                ʾ = ʾ(fragment);
            } else {
                ʾ = z;
            }
            if (ʾ) {
                return true;
            }
            z = ʾ;
        }
        return false;
    }

    private boolean ʾ(Fragment fragment) {
        return (fragment.ˏˎ && fragment.ͺॱ) || fragment.ˊˋ.ˋˊ();
    }

    public static int ˋ(int i) {
        switch (i) {
            case 4097:
                return 8194;
            case 4099:
                return 4099;
            case 8194:
                return 4097;
            default:
                return 0;
        }
    }

    public static int ˎ(int i, boolean z) {
        switch (i) {
            case 4097:
                return z ? 1 : 2;
            case 4099:
                return z ? 5 : 6;
            case 8194:
                return z ? 3 : 4;
            default:
                return -1;
        }
    }

    @Nullable
    public View onCreateView(@Nullable View view, @NonNull String str, @NonNull Context context, @NonNull AttributeSet attributeSet) {
        if (!"fragment".equals(str)) {
            return null;
        }
        String string;
        String attributeValue = attributeSet.getAttributeValue(null, "class");
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, a.ˋ);
        if (attributeValue == null) {
            string = obtainStyledAttributes.getString(0);
        } else {
            string = attributeValue;
        }
        int resourceId = obtainStyledAttributes.getResourceId(1, -1);
        String string2 = obtainStyledAttributes.getString(2);
        obtainStyledAttributes.recycle();
        if (string == null || !jy.ˏ(context.getClassLoader(), string)) {
            return null;
        }
        int id;
        if (view != null) {
            id = view.getId();
        } else {
            id = 0;
        }
        if (id == -1 && resourceId == -1 && string2 == null) {
            throw new IllegalArgumentException(attributeSet.getPositionDescription() + ": Must specify unique android:id, android:tag, or have a parent with an id for " + string);
        }
        Fragment fragment;
        Fragment findFragmentById = resourceId != -1 ? findFragmentById(resourceId) : null;
        if (findFragmentById == null && string2 != null) {
            findFragmentById = findFragmentByTag(string2);
        }
        if (findFragmentById == null && id != -1) {
            findFragmentById = findFragmentById(id);
        }
        if (ˎ) {
            Log.v("FragmentManager", "onCreateView: id=0x" + Integer.toHexString(resourceId) + " fname=" + string + " existing=" + findFragmentById);
        }
        if (findFragmentById == null) {
            Fragment ॱ = ˋ().ॱ(context.getClassLoader(), string);
            ॱ.ʿ = true;
            ॱ.ˌ = resourceId != 0 ? resourceId : id;
            ॱ.ˍ = id;
            ॱ.ˎˎ = string2;
            ॱ.ʽॱ = true;
            ॱ.ˊᐝ = this;
            ॱ.ˊˊ = this.ˋॱ;
            ॱ.ˋ(this.ˋॱ.ˋॱ(), attributeSet, ॱ.ॱˊ);
            ॱ(ॱ, true);
            fragment = ॱ;
        } else if (findFragmentById.ʽॱ) {
            throw new IllegalArgumentException(attributeSet.getPositionDescription() + ": Duplicate id 0x" + Integer.toHexString(resourceId) + ", tag " + string2 + ", or parent id 0x" + Integer.toHexString(id) + " with another fragment for " + string);
        } else {
            findFragmentById.ʽॱ = true;
            findFragmentById.ˊˊ = this.ˋॱ;
            findFragmentById.ˋ(this.ˋॱ.ˋॱ(), attributeSet, findFragmentById.ॱˊ);
            fragment = findFragmentById;
        }
        if (this.ͺ >= 1 || !fragment.ʿ) {
            ʻ(fragment);
        } else {
            ˏ(fragment, 1, 0, 0, false);
        }
        if (fragment.ॱʼ == null) {
            throw new IllegalStateException("Fragment " + string + " did not create a view.");
        }
        if (resourceId != 0) {
            fragment.ॱʼ.setId(resourceId);
        }
        if (fragment.ॱʼ.getTag() == null) {
            fragment.ॱʼ.setTag(string2);
        }
        return fragment.ॱʼ;
    }

    public View onCreateView(String str, Context context, AttributeSet attributeSet) {
        return onCreateView(null, str, context, attributeSet);
    }

    public Factory2 ˊˊ() {
        return this;
    }
}
